In general, there are two types of code: compiled code and interpreted code. In the past, compiled code was compiled into an object code and then linked with other object codes to create an executable that was executed at run-time. Today, in some environments, compiled code includes source code that has been compiled into an intermediate form. At run-time, the intermediate form is compiled into native code for execution. In either of these scenarios, a developer may specify a type for each construct programmed in the source code. Types include integer, string, float, and the like. In contrast, for interpreted code within an interactive environment, the interactive environment processes each variable as a string. Therefore, interactive users may not specify the type for a variable.
Therefore, there is a need for a mechanism for assigning types and other constraints to variables in an interactive environment.